programming4us
           
 
 
Windows Server

Windows Server 2008 : Using dnscmd - Adding DNS Zones, Creating and Deleting DNS Records

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
7/7/2013 9:06:55 PM

1. Adding DNS Zones

You can add DNS zones with dnscmd. The basic format is

dnscmd server /zoneadd zonename /zonetype

The following table shows valid zone types you can create with the /zoneadd command.

Valid Zone Types for /zoneaddComments
/dsprimary
dnscmd server /zoneadd zonename
/dsprimary
c:\>dnscmd dc1 /zoneadd
pcg.pearson.pub /dsprimary

Adds an ADI zone named pcg.pearson.pub. If the server has a pearson.pub zone, this command adds the pcg zone in the pearson.pub zone (as pcg.pearson.pub).
/primary
dnscmd server /zoneadd zonename
/primary /file filename
c:\>dnscmd dc1 /zoneadd
learning.pearson.pub /primary
/file learning.dns

You can create a nonADI primary DNS zone with the /primary switch. You must specify only the server, the zone name, and the name of the file to hold the DNS zone data.
/secondary
dnscmd dc1 /zoneadd zonename
/secondary masterIPaddress
c:\>dnscmd dc1 /zoneadd
second.pearson.pub /secondary
192.168.1.150

If you have a primary DNS server in your network, you can use the /secondary switch to create a secondary zone. You must specify the server where you’re creating the zone, the zone name, and the IP address of the master or primary DNS server.

Figure 1 shows the result of executing the commands in the previous table. Notice that each zone has been added as an additional zone.

Figure 1. Zones created with the /zoneadd command

Note

In the Figure 1, the _msdcs.pearson.pub zone includes the SRV records for the domain, and the pearson.pub zone is the primary ADI zone for the domain. Only the other three zones were created from the previous table.


You can delete the zones created in the previous table with the following commands:

dnscmd dc1 /zonedelete pcg.pearson.pub /f /dsdel
dnscmd dc1 /zonedelete learning.pearson.pub /f
dnscmd dc1 /zonedelete second.pearson.pub /f

Note

The /f switch suppresses confirmation prompts, which is useful in a script. If the zone is an ADI zone (such as pcg.pearson.pub), you need to include the /dsdel switch to delete it from Active Directory.

2. Creating and Deleting DNS Records

It’s also possible to create and delete records in a DNS zone. The following table shows how this is done.

Commands to Create and Delete DNS RecordsComments
Create DNS records.
/recordadd
dnscmd /recordadd zonename hostname
recordtype IPaddress
c:\>dnscmd /recordadd pearson.pub Web2
A 192.168.1.11
c:\>dnscmd /recordadd pearson.pub Web2
ptr 192.168.1.11

You can add different types of records with the /recordadd switch. The example commands add an A record and a ptr record to the pearson.pub zone.
Delete DNS records.
/recorddelete
dnscmd dnsserver /recorddelete zonename
hostname record type /f
c:\>dnscmd dc1 /recorddelete
pearson.pub web2 a /f
c:\>dnscmd dc1 /recorddelete
pearson.pub web2 ptr /f

DNS records can be deleted with the /recorddelete switch. You must specify the server hosting the zone, the name of the zone, the name of the host, and the record type (such as A or ptr).

Note

The /f switch suppresses the confirmation.

Other -----------------
- Windows Server 2008 : Using dnscmd - Clearing the DNS Cache, Working with DNS Partitions
- Windows Server 2008 : Using dnscmd - Retrieving DNS Information, Exporting DNS Data, Forcing Zone Transfers
- Windows Small Business Server 2011 : Deploying SQL Server 2008 R2 for Small Business
- Windows Small Business Server 2011 : Deploying a Second Domain Controller
- Windows Small Business Server 2011 : Deploying a Second Server (part 2) - Performing Post-Installation Tasks - Changing the Computer Name and Joining the Domain
- Windows Small Business Server 2011 : Deploying a Second Server (part 2) - Performing Post-Installation Tasks - Adjusting Time Zone Settings, Configuring Network Settings
- Windows Small Business Server 2011 : Deploying a Second Server (part 1) - Installing a Second Server
- Windows Small Business Server 2011 : Adding a Second Server - Expanding Your Network
- Troubleshooting Windows Home Server 2011 : Troubleshooting Startup - Troubleshooting Startup Using the System Configuration Utility
- Troubleshooting Windows Home Server 2011 : Troubleshooting Device Problems
- Managing Windows Server 2012 Storage and File Systems : Storage Management (part 14) - Managing volumes on dynamic disks - Configuring RAID 5
- Managing Windows Server 2012 Storage and File Systems : Storage Management (part 13) - Managing volumes on dynamic disks - Configuring RAID 1, Mirroring boot and system volumes
- Managing Windows Server 2012 Storage and File Systems : Storage Management (part 12) - Managing volumes on dynamic disks - Creating a simple or spanned volume, Configuring RAID 0
- Managing Windows Server 2012 Storage and File Systems : Storage Management (part 11) - Managing GPT disk partitions on basic disks
- Managing Windows Server 2012 Storage and File Systems : Storage Management (part 10) - Managing MBR disk partitions on basic disks - Extending partitions, Shrinking partitions
- Managing Windows Server 2012 Storage and File Systems : Storage Management (part 9) - Managing MBR disk partitions on basic disks - Formatting a partition, logical drive, or volume, Configuring drive
- Managing Windows Server 2012 Storage and File Systems : Storage Management (part 8) - Managing MBR disk partitions on basic disks - Creating partitions and simple volumes
- Managing Windows Server 2012 Storage and File Systems : Storage Management (part 7) - Configuring storage - Creating and managing virtual hard disks for Hyper-V, Converting FAT or FAT32 to NTFS, Worki
- Managing Windows Server 2012 Storage and File Systems : Storage Management (part 6) - Configuring storage - Using the MBR and GPT partition styles, Using the disk storage types
- Managing Windows Server 2012 Storage and File Systems : Storage Management (part 5) - Configuring storage - Using the Disk Management tools, Adding new disks
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us